package shop.yaojianfeng.springlearning.section6.entity;

import cn.hutool.core.date.DateTime;

import java.util.Date;
import java.io.Serializable;

/**
 * 订单表(Order)实体类
 *
 * @author 
 * @since 2022-05-05 18:50:21
 */
public class Order implements Serializable {
    private static final long serialVersionUID = 207595074745024971L;
    
    private String oid;
    /**
     * 创建时间
     */
    private DateTime creatTime;
    /**
     * 订单金额
     */
    private Integer money;
    /**
     * 订单创建者
     */
    private String username;


    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }

    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(DateTime creatTime) {
        this.creatTime = creatTime;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("Order{");
        sb.append("oid='").append(oid).append('\'');
        sb.append(", creatTime=").append(creatTime);
        sb.append(", money=").append(money);
        sb.append(", username='").append(username).append('\'');
        sb.append('}');
        return sb.toString();
    }

    public Order(String oid, DateTime creatTime, Integer money, String username) {
        this.oid = oid;
        this.creatTime = creatTime;
        this.money = money;
        this.username = username;
    }

    public Order() {

    }
}

